<?php
/**
 * JSONRPCEndpoint class definition
 *  
 * @author Sean Crystal <seancrystal@gmail.com>
 * @package MutantVole
 */   

/**
 * Page class extended to work as a JSONRPC endpoint instead of regular html page
 * @package MutantVole
 * @subpackage Pages
 */
abstract class JSONRPCEndpoint extends Page {
	/**
	 * Default setup looks for matching Presenter and sets up default view with JSONRenderer.
	 * Shouldn't need to be changed.
	 */
	public function Setup() {
		$this->renderer = new JSONRenderer;
		
		$class = substr(get_class($this), 0, -8) . 'Presenter';
		
		$this->presenter = new $class(new View($this->renderer), $this->request);
	}
}

?>